The Java version of the Claims-based Frailty Index (CFI) is provided by Christoper Coulthard and
Douglas Bedell of Westat. The code is based upon the original SAS version developed by Dr. Kim and
his team at the Brigham and Women's Hospital Division of Pharmacoepidemiology and Pharmacoeconomics.
Updated on 12 July 2021 with new ICD-9 and ICD-10 diagnosis code lookups.

When unzipping the archive, allow the ZIP extraction to use directories to recreate the file structure
required of the Java package.

1. The Java code and supporting lookup and weighting files that are core to the model are stored in
a subfolder ./com/westat/frailty.

2. Compile the code into Java class files (assumes java/javac.exe can be found on system PATH).

  javac -cp . com\westat\frailty\*.java
	
3. Create a Java jar from the compiled classes (assumes java/jar.exe can be found on system PATH).

  jar -cfe frailty.jar com.westat.frailty.FrailtyScorer com\westat\frailty\*.class com\westat\frailty\*.txt com\westat\frailty\*.csv

4. Run the code using the following command, passing the name of a configuration file as an argument.
The example included uses the test data for the SAS and Python versions. The lookup files are built
into the jar, but can be overridden in the configuration. See the frailty.cfg file for details of
parameters required to run the code. The file should be edited to adjust for the runtime environment.

  java -jar frailty.jar frailty.cfg

5. The Java code outputs a comma-delimited file. The sample SAS and Python output using the same test data can
be found in the Python area of the Harvard Dataverse site (frailty_output_python.tab and frailty_output_sas.tab).
